<div class="col-md-6 <?php
if ($good['is_stock']) {
    echo 'goods_item_no_stock';
}
?>">
    <div class="half_thumbnail" id="<?php echo $good['goods_id']; ?>" >
        <?php
		//是否售完
		if($good['is_stock']){
		?>
        <img class="lazy good_img" src="/images/1zw.gif" data-original="<?php echo $good['product_img']; ?>" alt="<?php echo $good['goods_name']; ?>"  title="<?php echo $good['goods_name']; ?>">
        <?php
		}else{
		?>
        <a href="<?php echo Yii::app()->request->hostInfo.Yii::app()->createUrl('/front/good/show', array('gid' => $good['goods_id'])); ?>" target="_blank" class="good_url" title="<?php echo $good['goods_name']; ?>">
            <img class="lazy good_img" src="/images/1zw.gif" data-original="<?php echo $good['product_img']; ?>" alt="<?php echo $good['goods_name']; ?>"  title="<?php echo $good['goods_name']; ?>">
        </a>
        <?php
		}
		?>
        <div class="caption">
            <div class="half-title">
                <span ><?php echo $good['goods_name']; ?></span>
            </div>
            <div class="half-info">
            	<div class="pull-left row">
            		<span class="pull-left price_icon">&#165</span>
            		<span class="pull-left promo_price"><?php echo $good['promo_price']; ?></span>
            		<div class="pull-left zhekou"><?php echo number_format($good['promo_price'] / $good['p_price'] * 10, 1);?> 折</div>
            	</div>
            	<div class="pull-left row origin-price_row">
            		<div class="pull-left">原价:</div>
            		<div class="pull-left origin-price">&#165 <?php echo number_format($good['p_price'], 0);?></div>
            	</div>
            	<div class="pull-right sales row">
            		<?php
					if ($good['is_stock']) :
					    echo $good['sales_str'];
					else:
						echo "已售:<span>".mb_substr($good['sales_str'], 2, strlen($good['sales_str']),'utf-8')." </span>";
					endif;
					?>
            	</div>
            	<a  class="pull-left buy_btn" href="<?php echo Yii::app()->request->hostInfo.Yii::app()->createUrl('/front/good/show', array('gid' => $good['goods_id'])); ?>" target="_blank" class="good_url" title="<?php echo $good['goods_name']; ?>">
	            	<div>
	            		我要购买
	            	</div>
	            </a>
            	<Div class="clearfix"></Div>
            </div>
            <!--
            
            <div class="share-box">
                <div class="share">
                	<div class="pull-left time"><?php echo $good['timer_str']; ?></div>
                    <div class="pull-right" >
                    	<a class="report_a" href="javascript:void(0);" onclick="window.open($(this).attr('data-url'));" data-url="<?php echo Yii::app()->createUrl('/front/punish/index', array('good_id' => $good['goods_id'])); ?>">
                    		[举报]
                    	</a>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            
            -->
        </div>
    </div>
    <!--"今日新品"-->
    <?php 
    	$time = $_SERVER["REQUEST_TIME"];
    	$timer = $good['end_time'] - $time;
    	$d = floor($timer / 86400);
    	if ($d > 0 && $d == 2) {
			echo '<div class="today_new"></div>';
		}
    ?>
    	
    <?php
	//是否售完
	if($good['is_stock']){
	?>
    <a class="no_stock_icon food_half_goods_stock" title="<?php echo $good['goods_name']; ?>"></a>
    <?php
	}else{
	?>
    <a class="no_stock_icon" href="<?php echo Yii::app()->request->hostInfo.Yii::app()->createUrl('/front/good/show', array('gid' => $good['goods_id'])); ?>" target="_blank"  title="<?php echo $good['goods_name']; ?>"></a>
    <?php
	}
	?>
</div>